-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] Auditor reset fix #136363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Auditor reset fix #136363
Conversation
Pinging @elastic/ml-core (Team:ML) |
abstract class AbstractMlAuditor<T extends AbstractAuditMessage> extends AbstractAuditor<T> { | ||
|
||
private static final Logger logger = LogManager.getLogger(AbstractMlAuditor.class); | ||
private volatile boolean isResetMode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isResetMode
logic does not appear to be necessary and is removed it to avoid sending 2 different messages (the first to enable reset mode and the second to disable it). CI may tell a different story.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds auditor reset action for deterministic resets in tests.
Adds auditor reset action for deterministic resets in tests.
Tests that assert certain messages are audited can fail because the test clean up can leak into the next test. When this happens the first few auditor messages of the current test are deleted by the reset request that has leaked from the previous test.
The fix is to add an explicit auditor reset action and call that rather than using the cluster state to communicate the reset request. This guarantees the auditor has been reset in the test clean up.
Closes #134001 #129457 #128166